Skip to content

chore(ci): add 14-minute timeout to claude-review job#18

Merged
justin-layerv merged 1 commit into
mainfrom
chore/claude-review-timeout
Apr 16, 2026
Merged

chore(ci): add 14-minute timeout to claude-review job#18
justin-layerv merged 1 commit into
mainfrom
chore/claude-review-timeout

Conversation

@justin-layerv
Copy link
Copy Markdown
Contributor

Summary

Adds an explicit timeout-minutes: 14 to the claude-review job in .github/workflows/claude-code-review.yml.

Without this, the job inherits GitHub Actions' default 6-hour timeout, which means a hung anthropics/claude-code-action@v1 run (observed on #8) consumes runner minutes and leaves a stale in_progress status check on the PR for hours.

Tailored timeout

The 14-minute value is derived from this repo's observed claude-review run times across the last 30 successful runs:

  • p50: 135s
  • p95: 5.12min
  • max: 19.07min
  • mean: 173s

Formula: max(8, ceil(p95_minutes * 2) + 2) — 2× p95 + 2-minute safety margin, floored at 8 minutes. This gives each repo a bound that's generous relative to its own historical upper-bound while still catching future hangs within a reasonable window.

Test plan

  • Single-line diff (only the new timeout-minutes line is added)
  • Base64-roundtrip validated
  • Next claude-review run on this repo should complete normally within the timeout

Context

Companion PRs are being opened across all 10 layervai repos that use this workflow, each with its own tailored timeout based on the repo's p95. Motivated by the stuck run at https://github.com/layervai/qurl-python/actions/runs/24288312714 which burned ~18 minutes before manual cancellation.

Bounds the `claude-review` job's wall-clock time so a hung
`anthropics/claude-code-action@v1` run (observed on #8)
can't consume a runner for hours before GitHub Actions' default
6-hour job timeout kicks in.

The `14`-minute value is tailored from this repo's observed
`claude-review` run durations across the last 30 successful runs,
using `max(8, ceil(p95_minutes * 2) + 2)` — 2x p95 + 2-minute
safety margin, floored at 8 minutes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@justin-layerv justin-layerv force-pushed the chore/claude-review-timeout branch from e026b27 to 97222a1 Compare April 11, 2026 18:31
@justin-layerv justin-layerv merged commit 3d94649 into main Apr 16, 2026
4 of 5 checks passed
@justin-layerv justin-layerv deleted the chore/claude-review-timeout branch April 16, 2026 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant